﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Abp.Domain.Entities;
using Toolbelt.ComponentModel.DataAnnotations.Schema;

namespace HCD.Entities
{
    [Table("HIS_LAB_RESULT")]
    public class HisLabResult : Entity<long>
    {
        /// <summary>
        /// 检验单号
        /// </summary>
        [Column("LAB_TEST_NO", TypeName = "VARCHAR(20)"), Required, Index("INDEX_LAB_RESULT", 1, IsUnique = true)]
        public string LabTestNo { get; set; }

        /// <summary>
        /// 项目序号
        /// </summary>
        [Column("ITEM_NO", TypeName = "INT"), Index("INDEX_LAB_RESULT", 2, IsUnique = true)]
        public int? ItemNo { get; set; }

        /// <summary>
        /// 检验报告项目名称
        /// </summary>
        [Column("REPORT_ITEM_NAME", TypeName = "VARCHAR(40)"), Required]
        public string ReportItemName { get; set; }

        /// <summary>
        /// 检验报告项目代码
        /// </summary>
        [Column("REPORT_ITEM_CODE", TypeName = "VARCHAR(16)"), Required]
        public string ReportItemCode { get; set; }

        /// <summary>
        /// 检验结果值
        /// </summary>
        [Column("RESULT", TypeName = "VARCHAR(60)"), Required]
        public string Result { get; set; }

        /// <summary>
        /// 检验结果单位
        /// </summary>
        [Column("UNITS", TypeName = "VARCHAR(8)")]
        public string Units { get; set; }

        /// <summary>
        /// 结果正常标志[N正常H高L低T高危B低危]
        /// </summary>
        [Column("ABNORMAL_INDICATOR", TypeName = "VARCHAR(2)")]
        public string AbnormalIndicator { get; set; }

        /// <summary>
        /// 最大值
        /// </summary>
        [Column("MAXEGENT_LIMIT", TypeName = "DECIMAL")]
        public decimal? MaxegentLimit { get; set; }

        /// <summary>
        /// 最小值
        /// </summary>
        [Column("MINEGENT_LIMIT", TypeName = "DECIMAL")]
        public decimal? MinegentLimit { get; set; }

        /// <summary>
        /// 结果范围
        /// </summary>
        [Column("RESULT_RANGE", TypeName = "VARCHAR(100)")]
        public string ResultRange { get; set; }
    }
}